package com.jh3502.vivo.function.contact;

import android.content.Context;

import com.google.gson.Gson;
import com.jh3502.vivo.base.BaseJson;
import com.jh3502.vivo.base.BaseModel;
import com.jh3502.vivo.net.ApiClient;
import com.jh3502.vivo.utils.SpHelper;

import java.util.HashMap;
import java.util.Map;

import retrofit2.Callback;

/**
 * @author harisucici
 * @date 2017/6/19
 */

public class ContactModel extends BaseModel {

    public ContactModel(Context context) {
        super(context);
    }

    public void getorganization(Map<String, Object> body, Callback<BaseJson> callback) {
        Map<String, Object> bodyMain = new HashMap<>(2);
        bodyMain.put("json", new Gson().toJson(body));
        mCall = ApiClient.apiList.getorganization(SpHelper.getInstance().getToken(), bodyMain);
        mCall.enqueue(callback);
    }


    public void findEntrustUsers(Callback<BaseJson> callback) {
        mCall = ApiClient.apiList.findEntrustUsers(SpHelper.getInstance().getToken());
        mCall.enqueue(callback);
    }

}
